From: Florian Müllner Date: Sat, 30 Nov 2019 00:23:35 +0000 (+0100) Subject: extensionPrefs: Simplify empty placeholder X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~55 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9916989272a71f0e9c4b466304dbcf5133538e48;p=gnome-shell.git extensionPrefs: Simplify empty placeholder GNOME Software will remove its extension support, so we should stop referencing it in addition to extensions.gnome.org. In fact, the placeholder is not the best place to hint at where new extensions can be found, as the user will never see it in case the distribution includes pre-installed extensions. So remove the hint altogether, we will add it back in a more prominent place later. With the whole placeholder now being much lighter, we can stop dimming the remaining elements. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968 --- diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 9033165f6..5343fd55d 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -451,62 +451,22 @@ class EmptyPlaceholder extends Gtk.Box { orientation: Gtk.Orientation.VERTICAL, spacing: 6, margin: 32, + valign: Gtk.Align.CENTER, }); let image = new Gtk.Image({ icon_name: 'application-x-addon-symbolic', pixel_size: 96, visible: true, - vexpand: true, - valign: Gtk.Align.END, }); - image.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL); this.add(image); let label = new Gtk.Label({ - label: `${_("No Extensions Installed")}`, + label: `${_('No Installed Extensions')}`, use_markup: true, visible: true, }); - label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL); this.add(label); - - let appInfo = Gio.DesktopAppInfo.new('org.gnome.Software.desktop'); - - let desc = new Gtk.Label({ - label: _("Extensions can be installed through Software or extensions.gnome.org."), - use_markup: true, - wrap: true, - justify: Gtk.Justification.CENTER, - visible: true, - max_width_chars: 50, - hexpand: true, - vexpand: appInfo == null, - halign: Gtk.Align.CENTER, - valign: Gtk.Align.START, - }); - this.add(desc); - - if (appInfo) { - let button = new Gtk.Button({ - label: _("Browse in Software"), - image: new Gtk.Image({ - icon_name: "org.gnome.Software-symbolic", - }), - always_show_image: true, - margin_top: 12, - visible: true, - halign: Gtk.Align.CENTER, - valign: Gtk.Align.START, - vexpand: true, - }); - this.add(button); - - button.connect('clicked', w => { - let context = w.get_display().get_app_launch_context(); - appInfo.launch([], context); - }); - } } });